home *** CD-ROM | disk | FTP | other *** search
- import javax.microedition.lcdui.Display;
- import javax.microedition.midlet.MIDlet;
-
- public class GameMIDlet extends MIDlet implements Runnable {
- // $FF: renamed from: goto javax.microedition.lcdui.Display
- private Display field_0;
- // $FF: renamed from: try l
- private l field_1;
- // $FF: renamed from: for h
- private h field_2;
- // $FF: renamed from: new boolean
- private boolean field_3 = true;
- // $FF: renamed from: char int
- private int field_4 = -1;
- // $FF: renamed from: do int
- private int field_5 = 0;
- // $FF: renamed from: case boolean
- private boolean field_6;
- // $FF: renamed from: byte java.lang.Thread
- private Thread field_7;
- // $FF: renamed from: if java.lang.String
- private final String field_8 = "MenuConfigName";
- // $FF: renamed from: int java.lang.String
- private final String field_9 = "GameConfigName";
- // $FF: renamed from: a java.lang.String
- private final String field_10 = "MenuModeName";
- // $FF: renamed from: else java.lang.String
- private final String field_11 = "GameModeName";
-
- public GameMIDlet() {
- try {
- this.field_0 = Display.getDisplay(this);
- Object var1 = null;
- String var2 = ((MIDlet)this).getAppProperty("MenuConfigName");
- if (var2 != null) {
- this.getClass();
- var1 = Class.forName(var2).newInstance();
- } else {
- System.out.println("Warning: Menu mode config not defined");
- }
-
- if (((MIDlet)this).getAppProperty("MenuModeName") == null) {
- System.out.println("Error: Menu mode not defined");
- }
-
- this.getClass();
- this.field_2 = (h)Class.forName(((MIDlet)this).getAppProperty("MenuModeName")).newInstance();
- this.field_2.a(this);
- this.field_2.a(var1);
- var2 = ((MIDlet)this).getAppProperty("GameConfigName");
- if (var2 != null) {
- this.getClass();
- var1 = Class.forName(var2).newInstance();
- } else {
- System.out.println("Warning: Game mode config not defined");
- }
-
- if (((MIDlet)this).getAppProperty("GameModeName") == null) {
- System.out.println("Error: Game mode not defined");
- }
-
- this.getClass();
- this.field_1 = (l)Class.forName(((MIDlet)this).getAppProperty("GameModeName")).newInstance();
- this.field_1.a(this);
- this.field_1.a(var1);
- this.field_2.a(this.field_1);
- this.field_2.a(this.field_1.goto());
- this.field_2.byte(this.field_1.char());
- } catch (Exception var3) {
- ((Throwable)var3).printStackTrace();
- ((MIDlet)this).notifyDestroyed();
- }
-
- }
-
- public void startApp() {
- try {
- if (this.field_3) {
- this.field_0.setCurrent(this.field_2);
- this.field_2.byte();
- m.a();
- this.field_4 = 0;
- } else if (this.field_4 == 0) {
- this.field_2.try();
- } else {
- this.field_1.try();
- }
- } catch (Exception var2) {
- ((Throwable)var2).printStackTrace();
- ((MIDlet)this).notifyDestroyed();
- }
-
- }
-
- public void pauseApp() {
- if (this.field_4 == 0) {
- this.field_2.if();
- } else {
- this.field_1.if();
- }
-
- }
-
- public void destroyApp(boolean var1) {
- this.field_5 = 1;
- this.field_1.a();
- this.field_2.a();
- }
-
- // $FF: renamed from: a (boolean) void
- public void method_0(boolean var1) {
- if (this.field_7 == null) {
- this.field_6 = var1;
- this.field_7 = new Thread(this);
- this.field_7.start();
- }
-
- }
-
- // $FF: renamed from: a () void
- public void method_1() {
- if (this.field_5 == 0) {
- this.field_4 = 0;
- boolean var1 = false;
- if (this.field_1.new() && !this.field_1.goto()) {
- this.field_1.do();
- this.field_2.a(false);
- this.field_2.byte(this.field_1.char());
- if (this.field_2.byte(this.field_1.else(), this.field_1.case())) {
- var1 = true;
- }
- } else if (!this.field_1.int()) {
- this.field_1.if();
- this.field_2.a(true);
- } else {
- this.field_2.a(true);
- }
-
- this.field_0.setCurrent(this.field_2);
- this.field_2.byte();
- if (var1) {
- this.field_2.try(this.field_1.else(), this.field_1.case());
- }
-
- }
- }
-
- // $FF: renamed from: if () void
- public void method_2() {
- if (this.field_4 == 1) {
- this.method_1();
- }
-
- }
-
- // $FF: renamed from: do () void
- public void method_3() {
- this.field_5 = 1;
- if (this.field_4 == 0) {
- this.field_2.do();
- } else {
- this.field_1.do();
- }
-
- this.field_1.a();
- this.field_2.a();
- ((MIDlet)this).notifyDestroyed();
- }
-
- public void run() {
- this.field_2.do();
- this.field_4 = 1;
- if (this.field_6) {
- if (!this.field_1.new() && !this.field_3) {
- this.field_1.do();
- }
-
- this.field_0.setCurrent(this.field_1);
- this.field_1.if(this.field_2.b());
- this.field_1.do(this.field_2.void());
- this.field_1.byte();
- } else {
- this.field_0.setCurrent(this.field_1);
- if (this.field_1.new()) {
- this.field_1.if(this.field_2.b());
- this.field_1.do(this.field_2.void());
- this.field_1.byte();
- } else {
- this.field_1.try();
- }
- }
-
- this.field_3 = false;
- this.field_7 = null;
- }
- }
-